<!-- 编辑 -->
<script id="tpl-edit" type="text/template">
    <div class="am-padding-xs am-padding-top-sm">
        <div class="tips am-margin-bottom-sm am-u-sm-12">
        {{ if model.apply_status.value == 10 }}
            <div class="pre-warning"><p> 提示：资料审核中，有问题会给您电话联系</p></div>
        {{ /if }}
        {{ if model.apply_status.value == 20 }}
            <div class="pre-info"><p> 提示：资料验证中，请在您微信中完成实名验证</p></div>
        {{ /if }}
        {{ if model.apply_status.value == 30 }}
            <div class="pre-success"><p> 提示：申请已通过,您已注册成功</p></div>
        {{ /if }}
        {{ if model.apply_status.value == 40 }}
            <div class="pre-error">
                <p> 提示：申请被驳回，请按要求修改后提交</p>
                <p>驳回原因：{{ model.reject }}</p>
            </div>
        {{ /if }}
        </div>
        <fieldset>
            <div class="widget-head am-cf">
                <div class="widget-title am-fl">{{ model.apply_mode.text }}</div>
            </div>
            {{ if model.apply_mode.value == 10 || model.apply_mode.value == 30 }}
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label"> {{ model.apply_mode.text }}(小程序ID) </label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" value="{{ model.applet_id }}" disabled>
                </div>
            </div>
            {{ /if }}
            {{ if model.apply_mode.value != 40 }}
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label form-require">营业执照 </label>
                <div class="am-u-sm-9">
                    <div class="apply-img">
                        <a href="{{ model.details.license_copy.url }}" target="_blank">
                            <img src="{{ model.details.license_copy.url }}" />
                        </a>
                    </div>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label form-require">公司名称 </label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" 
                    name="data[details][merchant_name]" value="{{ model.details.merchant_name }}" 
                    {{ model.apply_status.value == 40 ? '' : 'disabled' }} required>
                    <small>营业执照上面的名称</small>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label form-require">统一社会信用代码 </label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" 
                    name="data[details][license_number]" value="{{ model.details.license_number }}" 
                    {{ model.apply_status.value == 40 ? '' : 'disabled' }} required>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label form-require">身份证 </label>
                <div class="am-u-sm-9">
                    <div class="apply-img">
                        <a href="{{ model.details.id_card_copy.url }}" target="_blank">
                            <img src="{{ model.details.id_card_copy.url }}" />
                        </a>
                    </div>
                    <div class="apply-img">
                        <a href="{{ model.details.id_card_national.url }}" target="_blank">
                            <img src="{{ model.details.id_card_national.url }}" />
                        </a>
                    </div>
                </div>
            </div>
            {{ /if }}
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label form-require"> 证件姓名 </label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" 
                    name="data[details][id_card_name]" value="{{ model.details.id_card_name }}" 
                    {{ model.apply_status.value == 40 ? '' : 'disabled' }} required>
                    <small>身份证上面的姓名</small>
                </div>
            </div>
            {{ if model.apply_mode.value != 40 }}
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label form-require"> 证件号码 </label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" 
                    name="data[details][id_card_number]" value="{{ model.details.id_card_number }}" 
                    {{ model.apply_status.value == 40 ? '' : 'disabled' }} required>
                </div>
            </div>
            {{ /if }}
            {{ if model.apply_mode.value == 30 }}
            {{ if model.details.qualifications.url != '' }}
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label">特殊资质 </label>
                <div class="am-u-sm-9">
                    <div class="apply-img">
                        <a href="{{ model.details.qualifications.url }}" target="_blank">
                            <img src="{{ model.details.qualifications.url }}" />
                        </a>
                    </div>
                </div>
            </div>
            {{ /if }}
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label">支付商户号 </label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" value="{{ model.details.mch_id }}" disabled>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label">app_id </label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" value="{{ model.app_id }}" 
                    name="data[app_id]" {{ model.apply_status.value == 40 ? '' : 'disabled' }} required>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label form-require">开户银行</label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" value="{{ model.details.bank_name }}" 
                     name="data[details][bank_name]" {{ model.apply_status.value == 40 ? '' : 'disabled' }} required>
                     <small>例如：xx银行xx市xx区xx县xx支行</small>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label form-require">银行账号</label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" value="{{ model.details.account_number }}" 
                     name="data[details][account_number]" {{ model.apply_status.value == 40 ? '' : 'disabled' }} required>
                     <small>如营业执照类型为公司，必须填写公司公户账号。如为个体工商户，只需填写负责人私户账号</small>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label form-require">商户简称</label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" value="{{ model.merchant_shortname }}" 
                     name="data[merchant_shortname]" {{ model.apply_status.value == 40 ? '' : 'disabled' }} required>
                     <small>用户付款时显示的收款名称，如设置为门店名称或者小程序名称，例如：肯德基、河马科技</small>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label form-require">电子邮箱</label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" value="{{ model.details.contact_email }}" 
                     name="data[details][contact_email]" {{ model.apply_status.value == 40 ? '' : 'disabled' }} required>
                </div>
            </div>
            {{ /if }}
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label form-require"> 手机号 </label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" 
                    name="data[details][mobile_phone]" value="{{ model.details.mobile_phone }}" 
                    {{ model.apply_status.value == 40 ? '' : 'disabled' }} required>
                </div>
            </div>
            {{ if model.apply_mode.value == 10 || model.apply_mode.value == 20 }}
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label form-require"> 微信号 </label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" 
                    name="data[details][legal_persona_wechat]" value="{{ model.details.legal_persona_wechat }}" 
                    {{ model.apply_status.value == 40 ? '' : 'disabled' }} required>
                    <small>不是绑定的手机号！请打开微信->我的->点击头像->查看微信号<br>
                    微信必须实名认证，并与上面身份证姓名一致。</small>
                </div>
            </div>
            {{ /if }}
            {{ if model.apply_mode.value == 40 }}
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label">级别</label>
                <div class="am-u-sm-9">
                    <label class="am-radio-inline">
                        <input type="radio" data-am-ucheck {{ model.agent_mode.value == 10 ? 'checked' : '' }} disabled> 县区
                    </label>
                    <label class="am-radio-inline">
                        <input type="radio" data-am-ucheck {{ model.agent_mode.value == 20 ? 'checked' : '' }} disabled> 市级
                    </label>
                    <label class="am-radio-inline">
                        <input type="radio" data-am-ucheck {{ model.agent_mode.value == 30 ? 'checked' : '' }} disabled> 省级
                    </label>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label">区域</label>
                <div class="am-u-sm-9">
                    <input type="text" class="tpl-form-input" value="{{ model.province }} {{ model.city }} {{ model.district }}" disabled>
                </div>
            </div>
            {{ /if }}
        </fieldset>
    </div>   
</script>
